import { Component, Input, OnInit } from '@angular/core';
import {
  ManualReviewText,
  ProcessIconType,
  PublicPayReviewText,
} from 'src/app/const/process';

@Component({
  selector: 'app-process',
  templateUrl: './process.component.html',
  styleUrls: ['./process.component.scss'],
})
export class ProcessComponent implements OnInit {
  @Input() set process(
    value: {
      text: PublicPayReviewText | ManualReviewText;
      active: boolean;
      type: ProcessIconType;
    }[]
  ) {
    if (value) {
      this.processData = value;
    }
  }

  processData: {
    text: PublicPayReviewText | ManualReviewText;
    active: boolean;
    type: ProcessIconType;
  }[] = [
    {
      text: PublicPayReviewText.PROCESS_1,
      active: true,
      type: ProcessIconType.NUMBER
    },
    {
      text: PublicPayReviewText.PROCESS_2,
      active: true,
      type: ProcessIconType.NUMBER
    },
    {
      text: PublicPayReviewText.PROCESS_3,
      active: false,
      type: ProcessIconType.CIRCLE
    },
    {
      text: PublicPayReviewText.PROCESS_4,
      active: false,
      type: ProcessIconType.CIRCLE
    },
  ];

  ProcessIconType = ProcessIconType;

  constructor() {}

  ngOnInit() {}
}
